import { createSSRApp } from 'vue'
import * as Pinia from 'pinia'
import tmui from './tmui'
import App from './App.vue'
import * as Router from './router'
// #ifdef H5
import queuePlugin from './plugins/queue'
import 'highlight.js/styles/default.css'; // 或者选择其他主题, 例如 'highlight.js/styles/atom-one-dark.css'
// #endif

export function createApp() {
  const app = createSSRApp(App)
  app.use(tmui, { shareDisable: true, router: Router } as Tmui.tmuiConfig)
  // #ifdef H5
  app.use(queuePlugin)
  // #endif
  return {
    app,
    Pinia
  }
}
